home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************
- * *
- * Copyright (c) 1991 Silicon Graphics, Inc. *
- * All Rights Reserved *
- * *
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI *
- * *
- * The copyright notice above does not evidence any actual of intended *
- * publication of such source code, and is an unpublished work by Silicon *
- * Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is *
- * the property of Silicon Graphics, Inc. Any use, duplication or *
- * disclosure not specifically authorized by Silicon Graphics is strictly *
- * prohibited. *
- * *
- * RESTRICTED RIGHTS LEGEND: *
- * *
- * Use, duplication or disclosure by the Government is subject to *
- * restrictions as set forth in subdivision (c)(1)(ii) of the Rights in *
- * Technical Data and Computer Software clause at DFARS 52.227-7013, *
- * and/or in similar or successor clauses in the FAR, DOD or NASA FAR *
- * Supplement. Unpublished - rights reserved under the Copyright Laws of *
- * the United States. Contractor is SILICON GRAPHICS, INC., 2011 N. *
- * Shoreline Blvd., Mountain View, CA 94039-7311 *
- **************************************************************************
- *
- * File: PrintBox.h
- *
- * Description: Public include file for the print box GUI.
- *
- **************************************************************************/
-
-
- #ident "$Revision: 1.6 $"
-
-
- #ifndef _PUI_PRINTBOX_H_
- #define _PUI_PRINTBOX_H_
-
-
- #include "spool.h"
- #include <Xm/Xm.h>
-
-
- /* Resource names */
-
- #define PuiNprinterList "printerList"
- #define PuiNnumPrinters "numPrinters"
- #define PuiNdefPrinter "defPrinter"
- #define PuiNprinter "printer"
- #define PuiNjobType "jobType"
- #define PuiNfilename "filename"
- #define PuiNfd "fd"
- #define PuiNbuffer "buffer"
- #define PuiNbufSize "bufferSize"
- #define PuiNshowFilename "showFilename"
- #define PuiNshowOptions "showOptions"
- #define PuiNshowNumCopies "showNumCopies"
- #define PuiNshowBannerTitle "showBannerTitle"
- #define PuiNshowCompletion "showCompletion"
- #define PuiNshowHandling "showHandling"
- #define PuiNshowPrinterOptions "showPrinterOptions"
- #define PuiNshowOptionsButton "showOptionsButton"
- #define PuiNshowSaveButton "showSaveButton"
- #define PuiNbuttonPlacement "buttonPlacement"
- #define PuiNbuttonSpacing "buttonSpacing"
- #define PuiNlistVisibleItemCount "listVisibleItemCount"
- #define PuiNprintingPolicy "printingPolicy"
- #define PuiNinsensitiveForeground "insensitiveForeground"
- #define PuiNinsensitiveBackground "insensitiveBackground"
- #define PuiNfilenameSensitive "filenameSensitive"
- #define PuiNnumCopiesSensitive "numCopiesSensitive"
- #define PuiNprinterOptionsSensitive "printerOptionsSensitive"
- #define PuiNprinterFont "printerFont"
- #define PuiNdefaultPrinterFont "defaultPrinterFont"
- #define PuiNbusyCursor "busyCursor"
- /* Labels */
- #define PuiNprintLabelString "printLabelString"
- #define PuiNuser1LabelString "user1LabelString"
- #define PuiNuser2LabelString "user2LabelString"
- #define PuiNuser3LabelString "user3LabelString"
- #define PuiNuser4LabelString "user4LabelString"
- #define PuiNoptionsbLabelString "optionsbLabelString"
- #define PuiNsaveLabelString "saveLabelString"
- #define PuiNcancelLabelString "cancelLabelString"
- #define PuiNhelpLabelString "helpLabelString"
- #define PuiNfilenameLabelString "filenameLabelString"
- #define PuiNprinterLabelString "printerLabelString"
- #define PuiNoptionLabelString "optionLabelString"
- #define PuiNnumCopiesLabelString "numCopiesLabelString"
- #define PuiNjobTitleLabelString "jobTitleLabelString"
- #define PuiNjobDefTitleLabelString "jobDefTitleLabelString"
- #define PuiNjobSpecTitleLabelString "jobSpecTitleLabelString"
- #define PuiNcompletionLabelString "completionLabelString"
- #define PuiNmailLabelString "mailLabelString"
- #define PuiNmessageLabelString "messageLabelString"
- #define PuiNhandlingLabelString "handlingLabelString"
- #define PuiNcopyJobLabelString "copyJobLabelString"
- #define PuiNlinkJobLabelString "linkJobLabelString"
- #define PuiNprinterSpecLabelString "printerSpecLabelString"
- #define PuiNsaveDlgTitleLabelString "saveDlgTitleLabelString"
- #define PuiNsaveDlgSaveLabelString "saveDlgSaveLabelString"
- #define PuiNsaveDlgUserLabelString "saveDlgUserLabelString"
- #define PuiNsaveDlgAllLabelString "saveDlgAllLabelString"
- #define PuiNsaveDlgCancelLabelString "saveDlgCancelLabelString"
- #define PuiNsaveDlgMsgLabelString "saveDlgMsgLabelString"
- /* Callback lists */
- #define PuiNprintCallback "printCallback"
- #define PuiNuser1Callback "user1Callback"
- #define PuiNuser2Callback "user2Callback"
- #define PuiNuser3Callback "user3Callback"
- #define PuiNuser4Callback "user4Callback"
- #define PuiNsaveCallback "saveCallback"
- #define PuiNcancelCallback "cancelCallback"
- #define PuiNhelpCallback "helpCallback"
- #define PuiNjobInfoCallback "jobInfoCallback"
- #define PuiNprinterSelectCallback "printerSelectCallback"
- #define PuiNprinterActionCallback "printerActionCallback"
- #define PuiNerrorCallback "errorCallback"
- #define PuiNoptionErrorCallback "optionErrorCallback"
- /* Spooler Options */
- #define PuiNnumCopies "numCopies"
- #define PuiNcopy "copy"
- #define PuiNmail "mail"
- #define PuiNmessage "message"
- #define PuiNjobTitle "jobTitle"
- #define PuiNprinterOptions "printerOptions"
-
- /* Resource classes */
-
- #define PuiCPrinterList "PrinterList"
- #define PuiCNumPrinters "NumPrinters"
- #define PuiCDefPrinter "DefPrinter"
- #define PuiCPrinter "Printer"
- #define PuiCJobType "JobType"
- #define PuiCFilename "Filename"
- #define PuiCFd "Fd"
- #define PuiCBuffer "Buffer"
- #define PuiCBufSize "BufferSize"
- #define PuiCShowFilename "ShowFilename"
- #define PuiCShowOptions "ShowOptions"
- #define PuiCShowNumCopies "ShowNumCopies"
- #define PuiCShowBannerTitle "ShowBannerTitle"
- #define PuiCShowCompletion "ShowCompletion"
- #define PuiCShowHandling "ShowHandling"
- #define PuiCShowPrinterOptions "ShowPrinterOptions"
- #define PuiCShowOptionsButton "ShowOptionsButton"
- #define PuiCShowSaveButton "ShowSaveButton"
- #define PuiCButtonPlacement "ButtonPlacement"
- #define PuiCButtonSpacing "ButtonSpacing"
- #define PuiCVisibleItemCount "VisibleItemCount"
- #define PuiCPrintingPolicy "PrintingPolicy"
- #define PuiCCallback "Callback"
- #define PuiCBackground "Background"
- #define PuiCForeground "Foreground"
- #define PuiCSensitive "Sensitive"
- #define PuiCFont "Font"
- #define PuiCCursor "Cursor"
- /* Labels */
- #define PuiCPrintLabelString "PrintLabelString"
- #define PuiCUser1LabelString "User1LabelString"
- #define PuiCUser2LabelString "User2LabelString"
- #define PuiCUser3LabelString "User3LabelString"
- #define PuiCUser4LabelString "User4LabelString"
- #define PuiCOptionsbLabelString "OptionsbLabelString"
- #define PuiCSaveLabelString "SaveLabelString"
- #define PuiCCancelLabelString "CancelLabelString"
- #define PuiCHelpLabelString "HelpLabelString"
- #define PuiCFilenameLabelString "FilenameLabelString"
- #define PuiCPrinterLabelString "PrinterLabelString"
- #define PuiCOptionLabelString "OptionLabelString"
- #define PuiCNumCopiesLabelString "NumCopiesLabelString"
- #define PuiCJobTitleLabelString "JobTitleLabelString"
- #define PuiCJobDefTitleLabelString "JobDefTitleLabelString"
- #define PuiCJobSpecTitleLabelString "JobSpecTitleLabelString"
- #define PuiCCompletionLabelString "CompletionLabelString"
- #define PuiCMailLabelString "MailLabelString"
- #define PuiCMessageLabelString "MessageLabelString"
- #define PuiCHandlingLabelString "HandlingLabelString"
- #define PuiCCopyJobLabelString "CopyJobLabelString"
- #define PuiCLinkJobLabelString "LinkJobLabelString"
- #define PuiCPrinterSpecLabelString "PrinterSpecLabelString"
- #define PuiCSaveDlgTitleLabelString "SaveDlgTitleLabelString"
- #define PuiCSaveDlgSaveLabelString "SaveDlgSaveLabelString"
- #define PuiCSaveDlgUserLabelString "SaveDlgUserLabelString"
- #define PuiCSaveDlgAllLabelString "SaveDlgAllLabelString"
- #define PuiCSaveDlgCancelLabelString "SaveDlgCancelLabelString"
- #define PuiCSaveDlgMsgLabelString "SaveDlgMsgLabelString"
- /* Spooler Options */
- #define PuiCNumCopies "NumCopies"
- #define PuiCCopy "Copy"
- #define PuiCMail "Mail"
- #define PuiCMessage "Message"
- #define PuiCJobTitle "JobTitle"
- #define PuiCPrinterOptions "PrinterOptions"
-
- /* Resource types */
-
- #define PuiRPrintingPolicy "PrintingPolicy"
- #define PuiRButtonPlacement "ButtonPlacement"
-
-
- /* PrintBox child tokens */
-
- #define PuiPRINTBOX_PRINT_BUTTON 1
- #define PuiPRINTBOX_USER1_BUTTON 2
- #define PuiPRINTBOX_USER2_BUTTON 3
- #define PuiPRINTBOX_CANCEL_BUTTON 4
- #define PuiPRINTBOX_HELP_BUTTON 5
- #define PuiPRINTBOX_WORK_AREA 6
- #define PuiPRINTBOX_SEPARATOR 7
- #define PuiPRINTBOX_USER3_BUTTON 8
- #define PuiPRINTBOX_USER4_BUTTON 9
- #define PuiPRINTBOX_SAVE_BUTTON 10
- #define PuiPRINTBOX_OPTIONS_BUTTON 11
-
- /* Print job type tokens */
-
- #define PuiPRINTJOB_FILENAME 1
- #define PuiPRINTJOB_DESCRIPTOR 2
- #define PuiPRINTJOB_BUFFER 3
-
- /* Printing policy tokens and strings */
-
- #define PuiWIDGET_PRINTING 1
- #define PuiAPPLICATION_PRINTING 2
-
- #define PuiWIDGET_PRINTING_STR "PuiWIDGET_PRINTING"
- #define PuiAPPLICATION_PRINTING_STR "PuiAPPLICATION_PRINTING"
-
- /* Action button placement tokens and strings */
-
- #define PuiBUTTONS_LEFT 1
- #define PuiBUTTONS_RIGHT 2
- #define PuiBUTTONS_CENTER 3
-
- #define PuiBUTTONS_LEFT_STR "PuiBUTTONS_LEFT"
- #define PuiBUTTONS_RIGHT_STR "PuiBUTTONS_RIGHT"
- #define PuiBUTTONS_CENTER_STR "PuiBUTTONS_CENTER"
-
- /* Callback reasons */
-
- #define PuiCR_NOREASON 0
- #define PuiCR_PRINT 1
- #define PuiCR_USER1 2
- #define PuiCR_USER2 3
- #define PuiCR_CANCEL 4
- #define PuiCR_HELP 5
- #define PuiCR_JOB_INFO 6
- #define PuiCR_PR_SELECT 7
- #define PuiCR_ERROR 8
- #define PuiCR_PR_ACTION 9
- #define PuiCR_USER3 10
- #define PuiCR_USER4 11
- #define PuiCR_SAVE 12
- #define PuiCR_OPT_ERROR 13
-
-
- /* Class record info */
-
- extern WidgetClass puiPrintBoxWidgetClass;
-
- typedef struct _PuiPrintBoxClassRec *PuiPrintBoxWidgetClass;
- typedef struct _PuiPrintBoxRec *PuiPrintBoxWidget;
-
-
- /* Callback structures */
- /* The following shows the value of various fields for the different
- callback reasons.
-
- reason event job_info selected_printer
-
- PuiCR_PRINT XEvent* NULL NULL
- PuiCR_USER1 XEvent* NULL NULL
- PuiCR_USER2 XEvent* NULL NULL
- PuiCR_USER3 XEvent* NULL NULL
- PuiCR_USER4 XEvent* NULL NULL
- PuiCR_SAVE XEvent* NULL NULL
- PuiCR_CANCEL XEvent* NULL NULL
- PuiCR_HELP XEvent* NULL NULL
- PuiCR_JOB_INFO NULL SLPrintJob* NULL
- PuiCR_PR_SELECT NULL NULL char*
- PuiCR_PR_ACTION NULL NULL char*
- PuiCR_ERROR NULL NULL NULL
- PuiCR_OPT_ERROR NULL NULL NULL
-
- reason selected_position error_code
-
- PuiCR_PRINT 0 0
- PuiCR_USER1 0 0
- PuiCR_USER2 0 0
- PuiCR_USER3 0 0
- PuiCR_USER4 0 0
- PuiCR_SAVE 0 0
- PuiCR_CANCEL 0 0
- PuiCR_HELP 0 0
- PuiCR_JOB_INFO 0 0
- PuiCR_PR_SELECT int 0
- PuiCR_PR_ACTION int 0
- PuiCR_ERROR 0 SLerrno
- PuiCR_OPT_ERROR 0 errno
- */
-
- typedef struct _PuiPrintBoxCallbackStruct { /* PrintBox callback structure */
- int reason; /* Callback reason */
- XEvent *event; /* X event structure */
- SLPrintJob *job_info; /* Print job info structure */
- char *selected_printer; /* Selected printer name */
- int selected_position; /* Position in printer list */
- int error_code; /* Error code */
- } PuiPrintBoxCallbackStruct;
-
-
- /* Public functions */
-
- #ifdef __cplusplus
- extern "C" {
- #endif
- extern Widget PuiCreatePrintBox(Widget, String, ArgList, Cardinal);
- extern Widget PuiCreatePrintDialog(Widget, String, ArgList, Cardinal);
- extern Widget PuiPrintBoxGetChild(Widget, int);
- extern void PuiPrintBoxDoPrint(Widget);
- extern Boolean PuiCvtStringToPrintingPolicy(Display*, XrmValuePtr,
- Cardinal*, XrmValuePtr,
- XrmValuePtr, XtPointer*);
- extern Boolean PuiCvtStringToButtonPlacement(Display*, XrmValuePtr,
- Cardinal*, XrmValuePtr,
- XrmValuePtr, XtPointer*);
- #ifdef __cplusplus
- }
- #endif
-
-
- #endif /* _PUI_PRINTBOX_H_ */
-